package com.hnucm.onlinealgstudy.service;

import com.hnucm.onlinealgstudy.dao.NoticeMapper;
import com.hnucm.onlinealgstudy.pojo.Approval;
import com.hnucm.onlinealgstudy.pojo.Notice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NoticeServiceImpl implements NoticeService {
    @Autowired
    NoticeMapper noticeMapper;
    @Override
    public void postNotice(Notice notice) {
        noticeMapper.postNotice(notice);
    }

    @Override
    public List<Notice> getNoticeList(String user_name) {
        return noticeMapper.getNoticeList(user_name);
    }

    @Override
    public void changeStatus(Approval approval) {
        noticeMapper.changeStatus(approval);
    }
}
